package com.yksj.healthtalk.adapter;

import java.util.ArrayList;

import org.universalimageloader.core.ImageLoader;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import com.yksj.healthtalk.ui.R;

/**
 * 寻找好友微博中的iterm
 * 
 * @author Tang
 * 
 */
public class WeiBoInfoAdapter extends BaseAdapter {

	private ArrayList<String> list = null;
	private LayoutInflater mInflater;
	private ImageLoader mImageLoader;

	public WeiBoInfoAdapter(Context context, ArrayList<String> list) {
		this.list = list;
		mInflater = LayoutInflater.from(context);
		mImageLoader = ImageLoader.getInstance();
	}

	@Override
	public int getCount() {

		return list.size();
	}

	@Override
	public Object getItem(int arg0) {

		return null;
	}

	@Override
	public long getItemId(int arg0) {
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHolder holder=new ViewHolder();
		if (convertView == null) {
			convertView=mInflater.inflate(R.layout.weibo_friend_iterm, null);
			holder.image=(ImageView)convertView.findViewById(R.id.image);
			holder.mName=(TextView)convertView.findViewById(R.id.name);
			holder.mAttion=(ImageView)convertView.findViewById(R.id.mAttation);
			convertView.setTag(holder);
		}
		holder=(ViewHolder) convertView.getTag();
		
//		mImageLoader.displayImage(uri, holder.image, mUnknowDisplayImageOptions);
		return convertView;
	}
	
	
	static class ViewHolder{
		private ImageView image;
		private TextView mName;
		private ImageView mAttion;
		
	}

}
